package gaml.yaml;

import java.util.ArrayList;
import java.util.HashMap;


/**
 * node with no value and children at all
 * @author shnireck_vi
 *
 */
public class EmptyNode extends YamlNode {
	public EmptyNode (YamlNode parent) { this.parent = parent; if (null != parent) level = parent.getLevel () + 1; }

	@Override
	public YamlNode addChild (YamlNode key, YamlNode val) { return this; }

	@Override
	public YamlNode addChild (YamlNode value) { return this; }

	@Override
	public YamlNode getChild (YamlNode key) { return null; }

	@Override
	public YamlNode getChild (int index) { return null; }

	@Override
	public HashMap <YamlNode, YamlNode> getMappingChildren () { return new HashMap <YamlNode, YamlNode> (); }

	@Override
	public ArrayList <YamlNode> getSequenceChildren () { return new ArrayList <YamlNode> (); }

	@Override
	public String getValue () { return ""; }

	@Override
	public boolean isEmpty () { return true; }

	@Override
	public YamlNode setValue (String value) { return this; }

}
